1. Technical Field
The present invention relates in general to an improved data processing system and in particular to an improved method and system for transforming image data from one format to another. Still more particularly, the present invention relates to an improved method and system for transforming image data from one format to another wherein the number of converters required is reduced.
2. Description of the Related Art
Images may be manipulated within a data processing system by a user. The manipulation of images may include placing an image within a document in a word processing application, altering an existing image, or creating an image utilizing a drawing application. In the instance where an image is imported or sent from one application to another, the format of the image in the originating program may be different from that of the target application. Such a situation typically requires conversion of the image into the format required by the target application. Importing an image from a file located on a disk also may require conversion or transformation of the image to meet the requirements of the program in which the image is to be utilized. A number of different image converting programs are presently available. These image programs can convert a number of different input images into a number of different output formats. For example, if M input image types and N output image types are desired Mxc3x97N different conversion programs are possible. To avoid this, presently available image conversion applications employ universal intermediate formats using the lowest common denominator and split the conversion into a two step process. First, an image format is converted into the intermediate format and then the intermediate format is converted to the output format. Such a technique reduces the number of converters required to M+N converters. This two step process, however, is inefficient in that the process must always convert the image into a lowest common denominator intermediate format. Such a conversion can result in unnecessary work in many cases where common features between the input format and the output format are present.
Therefore, it would be advantageous to have an image conversion process that reduced the amount of processing required to convert image data from the original or input format into the desired output format.
It is therefore one object of the present invention to provide an improved data processing system.
It is another object of the present invention to provide an improved method and system for transforming image data from one format to another.
It is yet another object of the present invention to provide. Still more particularly, the present invention relates to an improved method and system for transforming image data from one format to another wherein the number of converters required is reduced.
The foregoing objects are achieved as is now described. The present invention provides a method and system for transforming image data from a present format to a requested format. A request for the image data is received wherein the request includes a requested format, the requested format includes a first plurality of parameters. A present format for the image data is determined in response to receiving a request for the image data, wherein the present format includes a second plurality of parameters describing the image data. The first plurality of parameters within the requested format is compared to the second plurality of parameters within the present format describing the image data, wherein each parameter within the first plurality of parameters corresponds to a parameter within the second plurality of parameters. Parameters from the first and second plurality of parameters are identified, wherein a match between a parameter within the first plurality of parameters and a corresponding parameter within the second plurality of parameters is absent. The image data is altered utilizing the identified parameters, wherein the image data is transformed from a present format to a requested format.
The image data is altered by creating a filter system utilizing the identified parameters. The image data is padded through the filter system. The filter system is created by selecting a filters utilizing the identified parameters and connecting the plurality of filters together, wherein a first filter in the plurality of filters provides an input for the filter system for the image data and a last filter in the plurality of filters provides an output for the filter system.
The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description.